'use strict';
const logger = require('tracer').dailyfile({ root: './logs', maxLogFiles: 10, allLogsFileName: 'database' });


const datasource = require('knex')({
    client: 'mysql',
    connection: {
        host: '192.168.3.126',
        user: 'root',
        password: '',
        database: 'gsg'
    },

    pool: { min: 0, max: 10 },
    acquireConnectiontimeout: 10000
});

((knex)=>{
    knex.client.on('start',(builder)=>{
        builder.on('query',(query)=>{
            // console.log(query);
            // logger.log(global.uuid ,',',JSON.stringify(query));
        });
    });
})(datasource);



module.exports = datasource;